<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/19
 * Time: 14:27
 */

namespace app\admin\model;
use think\Model;

class Ad extends Model
{
    static function ad_type(){
        return db('adtype')->where('tp_status','in',1)->select();
    }
    static function add_type($data){
        if(db('adtype')->insert($data)){
            return true;
        }
        return false;
    }
    static function DelAdLst($id){
        $where = "id =". $id ." and ad_system = 2";
        return db('ad')->where($where)->find();
    }
}